<html>
<head><meta charset="utf-8"><title>vscode integration tests · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html">vscode integration tests</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198163239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198163239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> vsrs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198163239">(May 20 2020 at 07:32)</a>:</h4>
<p>Hi.</p>
<p>Maybe we should add some vscode integration tests to the CI? For example, I merely forgot to test binary targets and voila.. <a href="https://github.com/rust-analyzer/rust-analyzer/pull/4528">https://github.com/rust-analyzer/rust-analyzer/pull/4528</a></p>
<p>With minimal smoke testing, it would not happen. Are there any reasons not to add the extension testing into the CI?</p>
<p>P.S. The situation will get even more worse if we support different API for different vscode versions. mocha and vscode-test can help a lot.</p>



<a name="198163401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198163401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198163401">(May 20 2020 at 07:34)</a>:</h4>
<p>matklad wasn't really keen on it previously because they're pretty finicky to write and the cost/benefit seems high</p>



<a name="198164021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198164021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> vsrs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198164021">(May 20 2020 at 07:41)</a>:</h4>
<p>I've tried <a href="https://github.com/microsoft/vscode-test">https://github.com/microsoft/vscode-test</a> and it does not look too burden. Not to say easy :)</p>



<a name="198166189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198166189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198166189">(May 20 2020 at 08:05)</a>:</h4>
<p>I would be -1 on VS Code tests that spawn an actual rust-analyzer/cargo process. Adding unit tests seems fine to me, but I would strongly prefer to "just" write code that doesn't need a lot of testing. </p>
<p>Ie, ideally, I'd love to see a well-typed interface on the server, and a well-typed interface on the client, such that:</p>
<ul>
<li>we can manually inspect the interfaces and check that they are equivalent</li>
<li>we can be reasonably sure that, by just following the types, we do everything right </li>
</ul>
<p>But yeah, the above case is exactly where we have some meaningful logic on the client</p>



<a name="198169715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198169715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> vsrs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198169715">(May 20 2020 at 08:47)</a>:</h4>
<p>I did not mean heavy tests with actual  workspace building\running. Only some client-specific logic tests. I've called them <code>integration</code> because they might involve vscode running.</p>
<p>Though I would prefer to remove any logic from the client-side at all it is not always possible. For the above-mentioned case it is possible, I hope. Just not at the moment.</p>
<p>So, can I add such 'client unit-tests' to the master or it would be better to keep them in my local branches?</p>



<a name="198170032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198170032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198170032">(May 20 2020 at 08:50)</a>:</h4>
<p>Yup, <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span> on client-side tests</p>



<a name="198170046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198170046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198170046">(May 20 2020 at 08:50)</a>:</h4>
<p>We actually had them for <code>cargo check</code>, while that was implemented client-side</p>



<a name="198170545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/vscode%20integration%20tests/near/198170545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> vsrs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/vscode.20integration.20tests.html#198170545">(May 20 2020 at 08:56)</a>:</h4>
<p>Great! For the start I'll add them for a launch configuration generation and a bit later for shared downloads (<a href="https://github.com/rust-analyzer/rust-analyzer/issues/4469">https://github.com/rust-analyzer/rust-analyzer/issues/4469</a>)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>